home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / SCSL / sgesdd.z / sgesdd
Encoding:
Text File  |  2002-10-03  |  7.6 KB  |  199 lines

  1.  
  2.  
  3.  
  4. SSSSGGGGEEEESSSSDDDDDDDD((((3333SSSS))))                                                          SSSSGGGGEEEESSSSDDDDDDDD((((3333SSSS))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      SGESDD - compute the singular value decomposition (SVD) of a real M-by-N
  10.      matrix A, optionally computing the left and right singular vectors
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      SUBROUTINE SGESDD( JOBZ, M, N, A, LDA, S, U, LDU, VT, LDVT, WORK, LWORK,
  14.                         IWORK, INFO )
  15.  
  16.          CHARACTER      JOBZ
  17.  
  18.          INTEGER        INFO, LDA, LDU, LDVT, LWORK, M, N
  19.  
  20.          INTEGER        IWORK( * )
  21.  
  22.          REAL           A( LDA, * ), S( * ), U( LDU, * ), VT( LDVT, * ), WORK(
  23.                         * )
  24.  
  25. IIIIMMMMPPPPLLLLEEEEMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
  26.      These routines are part of the SCSL Scientific Library and can be loaded
  27.      using either the -lscs or the -lscs_mp option.  The -lscs_mp option
  28.      directs the linker to use the multi-processor version of the library.
  29.  
  30.      When linking to SCSL with -lscs or -lscs_mp, the default integer size is
  31.      4 bytes (32 bits). Another version of SCSL is available in which integers
  32.      are 8 bytes (64 bits).  This version allows the user access to larger
  33.      memory sizes and helps when porting legacy Cray codes.  It can be loaded
  34.      by using the -lscs_i8 option or the -lscs_i8_mp option. A program may use
  35.      only one of the two versions; 4-byte integer and 8-byte integer library
  36.      calls cannot be mixed.
  37.  
  38. PPPPUUUURRRRPPPPOOOOSSSSEEEE
  39.      SGESDD computes the singular value decomposition (SVD) of a real M-by-N
  40.      matrix A, optionally computing the left and right singular vectors. If
  41.      singular vectors are desired, it uses a divide-and-conquer algorithm.
  42.  
  43.      The SVD is written
  44.  
  45.           A = U * SIGMA * transpose(V)
  46.  
  47.      where SIGMA is an M-by-N matrix which is zero except for its min(m,n)
  48.      diagonal elements, U is an M-by-M orthogonal matrix, and V is an N-by-N
  49.      orthogonal matrix.  The diagonal elements of SIGMA are the singular
  50.      values of A; they are real and non-negative, and are returned in
  51.      descending order.  The first min(m,n) columns of U and V are the left and
  52.      right singular vectors of A.
  53.  
  54.      Note that the routine returns VT = V**T, not V.
  55.  
  56.      The divide and conquer algorithm makes very mild assumptions about
  57.      floating point arithmetic. It will work on machines with a guard digit in
  58.      add/subtract, or on those binary machines without guard digits which
  59.      subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. It could
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SSSSGGGGEEEESSSSDDDDDDDD((((3333SSSS))))                                                          SSSSGGGGEEEESSSSDDDDDDDD((((3333SSSS))))
  71.  
  72.  
  73.  
  74.      conceivably fail on hexadecimal or decimal machines without guard digits,
  75.      but we know of none.
  76.  
  77.  
  78. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  79.      JOBZ    (input) CHARACTER*1
  80.              Specifies options for computing all or part of the matrix U:
  81.              = 'A':  all M columns of U and all N rows of V**T are returned in
  82.              the arrays U and VT; = 'S':  the first min(M,N) columns of U and
  83.              the first min(M,N) rows of V**T are returned in the arrays U and
  84.              VT; = 'O':  If M >= N, the first N columns of U are overwritten
  85.              on the array A and all rows of V**T are returned in the array VT;
  86.              otherwise, all columns of U are returned in the array U and the
  87.              first M rows of V**T are overwritten in the array VT; = 'N':  no
  88.              columns of U or rows of V**T are computed.
  89.  
  90.      M       (input) INTEGER
  91.              The number of rows of the input matrix A.  M >= 0.
  92.  
  93.      N       (input) INTEGER
  94.              The number of columns of the input matrix A.  N >= 0.
  95.  
  96.      A       (input/output) REAL array, dimension (LDA,N)
  97.              On entry, the M-by-N matrix A.  On exit, if JOBZ = 'O',  A is
  98.              overwritten with the first N columns of U (the left singular
  99.              vectors, stored columnwise) if M >= N; A is overwritten with the
  100.              first M rows of V**T (the right singular vectors, stored rowwise)
  101.              otherwise.  if JOBZ .ne. 'O', the contents of A are destroyed.
  102.  
  103.      LDA     (input) INTEGER
  104.              The leading dimension of the array A.  LDA >= max(1,M).
  105.  
  106.      S       (output) REAL array, dimension (min(M,N))
  107.              The singular values of A, sorted so that S(i) >= S(i+1).
  108.  
  109.      U       (output) REAL array, dimension (LDU,UCOL)
  110.              UCOL = M if JOBZ = 'A' or JOBZ = 'O' and M < N; UCOL = min(M,N)
  111.              if JOBZ = 'S'.  If JOBZ = 'A' or JOBZ = 'O' and M < N, U contains
  112.              the M-by-M orthogonal matrix U; if JOBZ = 'S', U contains the
  113.              first min(M,N) columns of U (the left singular vectors, stored
  114.              columnwise); if JOBZ = 'O' and M >= N, or JOBZ = 'N', U is not
  115.              referenced.
  116.  
  117.      LDU     (input) INTEGER
  118.              The leading dimension of the array U.  LDU >= 1; if JOBZ = 'S' or
  119.              'A' or JOBZ = 'O' and M < N, LDU >= M.
  120.  
  121.      VT      (output) REAL array, dimension (LDVT,N)
  122.              If JOBZ = 'A' or JOBZ = 'O' and M >= N, VT contains the N-by-N
  123.              orthogonal matrix V**T; if JOBZ = 'S', VT contains the first
  124.              min(M,N) rows of V**T (the right singular vectors, stored
  125.              rowwise); if JOBZ = 'O' and M < N, or JOBZ = 'N', VT is not
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. SSSSGGGGEEEESSSSDDDDDDDD((((3333SSSS))))                                                          SSSSGGGGEEEESSSSDDDDDDDD((((3333SSSS))))
  137.  
  138.  
  139.  
  140.              referenced.
  141.  
  142.      LDVT    (input) INTEGER
  143.              The leading dimension of the array VT.  LDVT >= 1; if JOBZ = 'A'
  144.              or JOBZ = 'O' and M >= N, LDVT >= N; if JOBZ = 'S', LDVT >=
  145.              min(M,N).
  146.  
  147.      WORK    (workspace/output) REAL array, dimension (LWORK)
  148.              On exit, if INFO = 0, WORK(1) returns the optimal LWORK;
  149.  
  150.      LWORK   (input) INTEGER
  151.              The dimension of the array WORK. LWORK >= 1.  If JOBZ = 'N',
  152.              LWORK >= 3*min(M,N) + max(max(M,N),6*min(M,N)).  If JOBZ = 'O',
  153.              LWORK >= 3*min(M,N)*min(M,N) +
  154.              max(max(M,N),5*min(M,N)*min(M,N)+4*min(M,N)).  If JOBZ = 'S' or
  155.              'A' LWORK >= 3*min(M,N)*min(M,N) +
  156.              max(max(M,N),4*min(M,N)*min(M,N)+4*min(M,N)).  For good
  157.              performance, LWORK should generally be larger.  If LWORK < 0 but
  158.              other input arguments are legal, WORK(1) returns the optimal
  159.              LWORK.
  160.  
  161.      IWORK   (workspace) INTEGER array, dimension (8*min(M,N))
  162.  
  163.      INFO    (output) INTEGER
  164.              = 0:  successful exit.
  165.              < 0:  if INFO = -i, the i-th argument had an illegal value.
  166.              > 0:  SBDSDC did not converge, updating process failed.
  167.  
  168. FFFFUUUURRRRTTTTHHHHEEEERRRR DDDDEEEETTTTAAAAIIIILLLLSSSS
  169.      Based on contributions by
  170.         Ming Gu and Huan Ren, Computer Science Division, University of
  171.         California at Berkeley, USA
  172.  
  173.  
  174. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  175.      INTRO_LAPACK(3S), INTRO_SCSL(3S)
  176.  
  177.      This man page is available only online.
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.